#ifndef __SIMBOL__TABLE__H__
#define __SIMBOL__TABLE__H__

#include <map>
#include <vector>
#include <string>
#include <netthumb.h>


namespace netthumb
{

  class SymbolTable {
  private:

    map<string, HostI*> _hosts;
    map<string, RouterI*> _routers;
    map<string, NetworkI*> _networks;

  protected:
    bool _valid;

  public:

    SymbolTable();

    void insertNewHost(HostI* host, string id);
    void insertNewRouter(RouterI* router, string id);
    void insertNewNetwork(NetworkI* network, string id);
    bool getHostByID(string id, HostI& host);
    bool getDevicesByHost(string hostID, map<string, DeviceI*>& devMap);
    bool getRouterByID(string id, RouterI& router);
    bool getDevicesByRouter(string routerID, map<string, DeviceI*>& devMap);
    bool getNetworkByID(string id, NetworkI& network);
    bool isValid();

    map<string, HostI*>& getHosts();
    map<string, RouterI*>& getRouters();
    map<string, NetworkI*>& getNetworks();

    string toString();

    friend class ContextI;
  };
}

#endif
